home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Development Platforms / Apple II / Essentials / Technical.Notes / GSOS / TN.GSOS.010 < prev    next >
Encoding:
Text File  |  1990-09-21  |  2.2 KB  |  48 lines  |  [TEXT/pdos]

  1. Apple II
  2. Technical Notes
  3. _____________________________________________________________________________
  4.                                                   Developer Technical Support
  5.  
  6. GS/OS
  7. #10:    How Applications Find Their Files
  8.  
  9. Revised by:    Dave Lyons                                      September 1990
  10. Written by:    Dave Lyons                                        January 1990
  11.  
  12. This Technical Note explains how applications should find configuration and 
  13. other application-related files.
  14. Changes since January 1990:  Stated explicitly that the @ prefix is useful 
  15. only to applications.
  16. _____________________________________________________________________________
  17.  
  18. When an application is launched, GS/OS sets prefix 9 to the application's 
  19. parent directory.  It also sets prefix 1 to the same directory if the length 
  20. of the pathname is within a 64-character limit.  It does not set prefix 0 to 
  21. any special value.
  22.  
  23. If your application uses a partial pathname and depends upon prefix 0 to find 
  24. files at the same directory level, it may be working by accident (prefix 0 is 
  25. accidently set to the right directory), and sooner or later it won't work.
  26.  
  27. If your application needs to load a file named TitleScreen, the best way is to 
  28. use the pathname 9:TitleScreen.  If you just use TitleScreen, you are using 
  29. prefix 0, and you may or may not be looking in the right directory.
  30.  
  31. Files storing user-specific data should be stored in the at sign (@) prefix--
  32. this is just like prefix 9, except that it is set to the user's user folder on 
  33. an AppleShare server if the application was launched from a server.  Use 
  34. @:MySettings rather than 9:MySettings or MySettings.  (If you want to retrieve 
  35. the value of the @ prefix, you can call ExpandPath on the pathname "@:".)  
  36. Note that the @ prefix was introduced in System Software 5.0.
  37.  
  38. The @ prefix is useful only for applications, not for Desk Accessories, CDevs, 
  39. initialization files, or anything else; this type of code can get the path of 
  40. the user's folder by using the AppleShare FST's FST-Specific call GetUserPath.
  41.  
  42.  
  43. Further Reference
  44. _____________________________________________________________________________
  45.   o  GS/OS Reference
  46.   o  AppleTalk Technical Note #8, Using the @ Prefix
  47.  
  48.